<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <ul>
            <li v-for="(item,index) in person" >{{item}}</li>
        </ul>
        <button @click="walk()">走一走</button>

    </div>
    <script src="../../v2_base_classes/vue.js"></script>
    <script>
        const app=new Vue({
            el:"#app",
            data:{
              person:["帅哥","美女", "程序猿"]
            },
            methods:{
                walk(){
                    if(this.person.length>0){
                       const item=this.person.shift()
                       this.person.push(item)
                    }
                }
              
            }
        })
    </script>
</body>
</html>